package com.tssf.car_manage.service.impl;

import com.tssf.car_manage.entity.BrandDTO;
import com.tssf.car_manage.entity.MonthlyIncome;
import com.tssf.car_manage.mapper.ChartMapper;
import com.tssf.car_manage.service.ChartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChartServiceImpl implements ChartService {
    @Autowired
    ChartMapper chartMapper;
    @Override
    public int customerCount() {
        return chartMapper.customerCount();
    }

    @Override
    public int carCount() {
        return chartMapper.carCount();
    }

    @Override
    public int repairCount() {
        return chartMapper.repairCount();
    }

    @Override
    public List<MonthlyIncome> getIncomeByYear(int year) {

        return chartMapper.getIncomeByYear(year);
    }

    @Override
    public List<BrandDTO> getBrandLim5() {
        return chartMapper.getBrandLim5();
    }

    @Override
    public List<BrandDTO> getCarLim5() {
        return chartMapper.getCarLim5();
    }
}
